file_name = "my_file.txt"
content = "Hello,This is a exercise."

# 写入文件
with open("my_file.txt","w") as file:
    file.write(content)
    print(f"内容以写入文件：{file_name}")

# 读取文件内容
with open("my_file.txt","r") as file:
    content = file.read()
    print(content)